﻿@using TinyMoocSite.ViewModels
@model AccountOverview

@{
    ViewBag.Title = "账户管理";
    Layout = "~/Views/Administrator/FeatureLayout.cshtml";
}

@section CourseManage {  }
@section AccountManage { active }

@section RightContainer
{
    <h4>账户管理</h4><hr />
    <a href="/Administrator/CreateTeacher" class="btn btn-primary">创建教师账号</a>
    <br /><br />

    <table class="table">
        <thead>
            <tr>
                <th>账号</th>
                <th>姓名</th>
                <th>学号或工号</th>
                <th>类别</th>
                <th>创建日期</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            @foreach (AccountShortItem item in Model.AccountList)
            {
                <tr>
                    <td>@item.Username</td>
                    <td>@item.FullName</td>
                    <td>@item.LicenseId</td>
                    <td>@item.Privilege</td>
                    <td>@item.RegisterDate</td>
                    <td><a href="/Administrator/ResetPassword?Username=@item.Username">重置密码</a>&nbsp;&nbsp;
                        <a href="/Administrator/UserInfo?Username=@item.Username">查看信息</a></td>
                </tr>
            }
        </tbody>
    </table>
}
